//
// Created by harrybao on 2019/4/4.
//

#include "game.h"


void Game::Init()
{
    UtilMath::Init();
    UtilTime::Init();
    timer_manager_ = new TimerManager();
    timer_manager_->Init();

    object_pool_manager_ = new ObjectPoolManager();
    object_pool_manager_->Init();
}

void Game::UnInit()
{
    timer_manager_->UnInit();
    delete timer_manager_;
    timer_manager_ = nullptr;

    object_pool_manager_->UnInit();
    delete object_pool_manager_;
    object_pool_manager_ = nullptr;
}

void Game::Update(int32_t delta_time)
{
    timer_manager_->Update(delta_time);
}

TimerManager *Game::GetTimerManager()
{
    return timer_manager_;
}

ObjectPoolManager *Game::GetObjectPoolManager()
{
    return object_pool_manager_;
}
